package com.forum.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.forum.pojo.ForumArticle;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.forum.pojo.StudentInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 86152
* @description 针对表【forum_article(文章信息)】的数据库操作Mapper
* @createDate 2023-02-01 16:26:55
* @Entity com.forum.pojo.ForumArticle
*/
@Mapper
public interface ForumArticleMapper extends BaseMapper<ForumArticle> {
     ForumArticle selectByArticleId(@Param("articleId") String articleId);

     /**
      * updatrType 0为read 1为点赞 2为评论
      * @param var1
      * @param var2
      * @param var3
      */
     void updateArticleCount(@Param("updateType") Integer var1, @Param("changeCount") Integer var2, @Param("articleId") String var3);

    String findNickNameByUserId(@Param("userId")Long userId);
    String findAvartarUrlByUserId(@Param("userId")Long userId);


    List<ForumArticle> find0BoardEssay(@Param("theme")String theme, @Param("findType")String findType);

    List<ForumArticle> find1BoardEssay(@Param("theme")String theme, @Param("findType")String findType);

    Integer selectIdentity(Long userId);

}




